Documentation > CMS Template API Library > Asset > DeleteMetaFields(List[String])

DeleteMetaFields

Delete all the meta data fields whose names are in the given list.

public Dictionary<String,String> DeleteMetaFields(List[String])


Returns

A Dictionary containing the old values of the removed meta data fields

Parameters

NameDescriptionType
fieldsToRemove List of names of the meta data fields to remove. List<String>

Code Example

C#

Sample:
List<string> deleteFields = new List<string>() { "description", "title", "category", "keywords" };
Dictionary<string, string> deletedFields = asset.DeleteMetaFields(deleteFields);
              

Connect with Crownpeak